<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Hot Topic @ Twitter</title>

    <!-- Bootstrap -->
    <link href="../bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <link href="../bootstrap-3.3.5/datetime/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <!-- Custom styles for this template -->
    <link href="../css/custom.css" rel="stylesheet">
    <link href="../vis/vis.css" rel="stylesheet">
    
  </head>
  <body>
    <nav class="navbar navbar-inverse" style="margin-bottom:0">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.html">Hot Topic @Twitter</a>
       </div>
       <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li><a href="index.html">Hot Topic</a></li>
            <li class="dropdown active">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Sample 
                <span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li class="dropdown-header">Sample Analysis</li>
                <li><a href="degree.html">Degree Distribution</a></li>
                <li><a href="#">Twitter Like</a></li>
                <li><a href="follow.html">Follow Who</a></li>
              </ul>
            </li>
            <li><a href="contact.html">Contact</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>
    
    
    <br/>
    <div class="container" style="padding: 10px 15px 0;">
        <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title">Advertisement Injecting</h3>
            </div>
            <div class="panel-body">
                Analyze the key words based on the tweets of every user, determine their preferences, and do accurate advertising.
            </div>
        </div>
    </div>
    <br/>
   
    <div class="container">
        <div class="col">
            
            <div class="panel panel-info ">
                <div class="panel-heading">
                    <h3 class="panel-title">Twitter Like</h3>
                </div>
                <div class="panel-body row-sm-6">
                    <div id="networkchart" style="height:600px;"></div>
                </div>
            </div>
            
            
        </div>
        
    </div><!-- /container -->
    
    
    <footer class="footer">
      <div class="container">
        <p class="text-muted" align="center">
            &copy; Project For CMSC5733 Social Computing 2015 @CUHK
        </p>
      </div>
    </footer>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <!-- <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script> -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="../bootstrap-3.3.5/js/bootstrap.min.js"></script>

    <!-- Charts ======================================================================================= -->
    
    <!-- Network Chart -->
    <script src="../vis/vis.js"></script>
    <script type="text/javascript">
    var nodes = null;
    var edges = null;
    var network = null;

    function drawnetwork() {
    	nodes = [
    	         {id: 1, size:218, label: 'Wreath\n2999846600',  shape: 'ellipse' },
    	         {id: 2, size:141, label: 'Doormat\n70161128', shape: 'ellipse'},
    	         {id: 3, size:100, label: '@newmusic08\n45294367',shape: 'ellipse'},
    	         {id: 4, size:96, label: '#mtvstars\n2956834257',     shape: 'ellipse'},
    	         {id: 5, size:96, label: '#bicycle\n175358416', shape: 'ellipse'},
    	         {id: 6, size:95, label: 'quickbooks\n95625622',  shape: 'ellipse'},
    	         {id: 7, size:94, label: '@fineartamerica\n3308757898',shape: 'ellipse'},
    	         {id: 8, size:94, label: '#mtvstars\n2610373003', shape: 'ellipse'},
    	         {id: 9, size:92, label: 'laws\n86832612',    shape: 'ellipse'},
    	         {id: 10, size:92, label: '#fiverr\n3304625647',  shape: 'ellipse' },
    	         {id: 11, size:92, label: '#mtvstars\n2856826864',  shape: 'ellipse' },
                 {id: 12, size:90, label: '#ImUKBiz\n3131295460', shape: 'ellipse'},
                 {id: 13, size:90, label: '#summerslam\n2981878354',shape: 'ellipse'},
                 {id: 14, size:89, label: '#twitteam\n251629518',     shape: 'ellipse'    },
                 {id: 15, size:88, label: '#smackdown\n86902428', shape: 'ellipse'},
                 {id: 16, size:88, label: '#newfreebook\n3315562739',  shape: 'ellipse'},
                 {id: 17, size:88, label: '@edgehillmusic\n1631970223',shape: 'ellipse'},
                 {id: 18, size:86, label: '#Awethors\n2859881632', shape: 'ellipse'},
                 {id: 19, size:83, label: '#childrensbooks\n3367972834',    shape: 'ellipse'},
                 {id: 20, size:83, label: '#voicesavemark\n2878860929',  shape: 'ellipse' }
    	       ];

       edges = [
       ];

      // Instantiate our network object.
      var container = document.getElementById('networkchart');
      var data = {
        nodes: nodes,
        edges: edges
      };
      var options = {
        nodes: {
          shape: 'dot',
          scaling:{
            label: {
              min:8,
              max:20
            }
          }
        }
      };
      
      network = new vis.Network(container, data, options);
    }
    
    
    </script>
    
    <!-- Line Chart -->
    <script src="../Chart.js.1.2/Chart.js"></script>
    <script type="text/javascript">
          
    window.onload = function(){
        
        drawnetwork();
       
    }

    </script>
    
    <script src="../vis/googleAnalytics.js"></script>
    
  </body>
</html>
